package edu.neu.chenhan.fragment.cooperation;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import edu.neu.chenhan.R;

public class WelfareFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_welfare, container, false);

        // 目前预留跳转逻辑，实际跳转需要与小程序方对接
        view.findViewById(R.id.btn_jump_to_miniprogram).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 示例跳转逻辑，这里使用浏览器打开一个网址作为示例
                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.example.com"));
                startActivity(intent);
            }
        });

        return view;
    }
}